﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace DataShow.codeDAL
{
    public class TrendProcess
    {
        SqlHelper sqlhelper;
        public TrendProcess()
        {
            sqlhelper = new SqlHelper();
        }

        #region 得到温度数据
        /// <summary>
        /// 得到温度数据
        /// </summary>
        /// <param name="time"></param>
        /// <param name="station"></param>
        /// <param name="scene"></param>
        /// <param name="sendpoint"></param>
        /// <param name="product"></param>
        /// <returns></returns>
        public DataTable GetMaxt(DateTime time, string station, string spans, string sendpoint, string product,string type)
        {
            string sql = "select * from " + product + " where sendpoint='" + sendpoint + "' and [type]='" + type + "' and span in (" + spans + ") and [date]='" + time.ToString("yyyyMMdd") + "' order by span";
            Console.WriteLine(sql);
            return sqlhelper.ExecuteQuery(sql, CommandType.Text);
        } 
        #endregion


        public DataTable GetRealTemp(DateTime time, string scene)
        {
            return null;
        }

    }
}